logo

The best it Trainig Institute In Gurgaon

Selenium Architecture

./selenium-Architecture

Selenium Client Library

The Selenium Client Library supports various programming languages, enabling developers to write scripts in the language they are comfortable with. The languages supported include:

  • Java
  • Python
  • Ruby
  • C#
  • JavaScript

JSON Wire Protocol

The Selenium Client Library communicates with the Browser Drivers using the JSON Wire Protocol over HTTP. This protocol defines a RESTful web service interface for interacting with the browser.

Browser Drivers

The Browser Drivers act as intermediaries between the Selenium Client Library and the real browsers. Each browser has its own driver to translate the Selenium commands into actions performed in the browser. The supported drivers include:

  • ChromeDriver for Google Chrome
  • GeckoDriver for Mozilla Firefox
  • InternetExplorerDriver for Internet Explorer
  • SafariDriver for Safari
  • OperaDriver for Opera

Real Browsers

The real browsers execute the actions as instructed by the Browser Drivers. The browsers supported by Selenium include:

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari
  • Opera

How It Works

  • A Selenium script is written using one of the supported programming languages.
  • The script uses the Selenium Client Library to send commands.
  • These commands are sent to the appropriate Browser Driver using the JSON Wire Protocol over HTTP.
  • The Browser Driver translates the commands into browser-specific actions and communicates with the real browser to execute these actions.
  • The browser performs the actions and sends the response back through the Browser Driver to the Selenium Client Library.

This architecture allows Selenium to support multiple browsers and programming languages, making it a versatile tool for web browser automation.